package com.laicunba.ext.web.controller.console.sys;

import org.json.simple.JSONObject;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.laicunba.ext.web.controller.BaseController;
import com.laicunba.util.CacheUtil;

@Controller
@RequestMapping(value = "/console/ext/sys")
public class RedisController extends BaseController {

	@SuppressWarnings("unchecked")
	@ResponseBody
	@RequestMapping(value = "/findFromRedis.htm")
	public String findFromRedis(String key) {
		JSONObject json = new JSONObject();
		json.put("val", CacheUtil.getObjAttribute(key));
		return json.toJSONString();
	}
}
